<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <title>算数运算符</title>
    <script type="text/javascript">
        var a = 3.5; // = 把右边的赋值给左边的变量
        var b = 2;

        // var res1 = a + b;
        // var res2 = a - b;
        // var res3 = a * b;
        // var res4 = a / b;
        // var res5 = a % b;//求余
        // console.log(res1);
        // console.log(res2);
        // console.log(res3);
        // console.log(res4);
        // console.log(res5);
        // console.log(a+b);

        // a++;// a = a + 1;
        // b++;//自增
        // console.log(a);
        // console.log(b);

        // a--;// a = a - 1;
        // b--;
        // console.log(a);
        // console.log(b);

        // + - * / %
        // += -= *= /= %=
        // a += 2; //a=a+2;
        // a -= 2; //a=a-2;
        // a *= 2; //a=a*2;
        // a /= 2; //a=a/2;
        // a %= 2; //a=a%2;
        // console.log(a);

        var res1 = "Hello" + "World"; //HelloWorld
        var res2 = "Hello" + 100; //"Hello" + "100" Hello100
        var res3 = 100 + "Hello"; //100Hello
        var res4 = "100" + 100; //100100
        var res5 = 100 + 100 + "sikiedu.com"; //100100sikiedu.com ??? 不对
        var res6 = "sikiedu.com" + 100 + 100; //sikiedu.com100100
        console.log(res1);
        console.log(res2);
        console.log(res3);
        console.log(res4);
        console.log(res5);//200sikedu.com
        console.log(res6);

        var res7 = "" + a + b; //3.52;
        console.log(res7);//"3.52"
    </script>
</head>
<body>
    
</body>
</html>